package by.kniazhych.core.server.local {
	
	/**
	 * ...
	 * @author Boutylin Mikhail
	 */
	
	import by.kniazhych.core.constants.PeaceType;
	import by.kniazhych.core.constants.UserColor;
	import by.kniazhych.core.data.game.PeacePosition;
	import by.kniazhych.core.server.local.core.Motion;
	import by.kniazhych.core.server.local.data.BoardData;
	import by.kniazhych.core.server.local.events.RequestMotionEvent;
	import by.kniazhych.core.server.local.events.ServerGameEvent;
	import by.kniazhych.core.server.local.rules.IPlayer;
	import by.kniazhych.core.server.local.rules.Player;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	

	
	public class LocalPlayer extends Player {
		
		private var _enabled:Boolean;
		
		public function LocalPlayer(data:BoardData, color:uint) {
			super(data, color);
		}
		
		//--------------------------------------------------------------------------
		//
		//  PUBLIC METHODS
		//
		//--------------------------------------------------------------------------
		
		public function processMotion(sP:PeacePosition, fP:PeacePosition):Boolean {
			return super.dispatchEvent(new RequestMotionEvent(RequestMotionEvent.REQUEST_MOTION, new Motion(sP, fP), false, true));
		}
		
		override public function chosePeace():void {
			super.chosePeace();
			dispatchEvent(new ServerGameEvent(ServerGameEvent.PEACE_CHOISE));
		}
		
		
		
		
	}

}